Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite linekicker #2163

Merged
merged 15 commits into from
Jan 27, 2024
Merged

Rewrite linekicker #2163

merged 15 commits into from
Jan 27, 2024

Conversation

petergarud
Copy link
Contributor

Description

Rewrote linekicker.

Copy link
Contributor

@sid-parikh sid-parikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff Peter! I know I wrote half of this but I still have some requested changes just to clean it up before merging. Also I'm going to merge #2151 soon and then we might have to rebase this branch

@@ -13,30 +13,17 @@ using namespace rj_geometry;
namespace planning {

Trajectory LineKickPathPlanner::plan(const PlanRequest& plan_request) {
// TODO(?): ros param these
const float approach_speed = 0.05;
SPDLOG_INFO("Robot {} state {}", plan_request.shell_id, current_state_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this

reuse_path_count_ = 0;
}
Trajectory LineKickPathPlanner::initial(const PlanRequest& plan_request) {
// // Getting ball info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we fix this odd double-comment formatting?

target.position -= target.velocity.normalized(kRobotRadius + kBallRadius * 2);
// velocity
auto goal_to_ball = (plan_request.motion_command.target.position - ball.position);
auto vel = goal_to_ball.normalized() * 1.0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's refactor 1.0 into a class constant something like static constexpr double final_robot_speed ?

return path;
}
}
void LineKickPathPlanner::state_transition(BallState ball, RobotInstant start_instant) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can eliminate these parameters note the GH Actions warnings


// ball velocity filtering vars
static constexpr double IS_DONE_BALL_VEL = 1.5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH doesn't like this case style try something like kIsBallDoneVelocity or something like that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and maybe we should do a little more sim testing as to what the best value is

Copy link
Contributor

@sid-parikh sid-parikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

github-actions bot and others added 2 commits January 26, 2024 19:27
@sid-parikh sid-parikh merged commit 26caeb4 into ros2 Jan 27, 2024
2 checks passed
@sid-parikh sid-parikh deleted the rewrite-linekicker branch January 27, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants